using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class TM_TimeMap : EntityTypeConfiguration<TM_Time>
    {
        public TM_TimeMap()
        {
            // Primary Key
            this.HasKey(t => t.TM_TIME_ID);

            // Properties
            this.Property(t => t.TM_TIME_NAME12)
                .HasMaxLength(10);

            this.Property(t => t.TM_TIME_NAME24)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("TM_Time");
            this.Property(t => t.TM_TIME_ID).HasColumnName("TM_TIME_ID");
            this.Property(t => t.TM_TIME_NAME12).HasColumnName("TM_TIME_NAME12");
            this.Property(t => t.TM_TIME_NAME24).HasColumnName("TM_TIME_NAME24");
            this.Property(t => t.TM_TIME_Value).HasColumnName("TM_TIME_Value");
        }
    }
}
